package cn.cjj.gulimall.product.vo;

import cn.cjj.gulimall.product.entity.SkuImagesEntity;
import cn.cjj.gulimall.product.entity.SkuInfoEntity;
import cn.cjj.gulimall.product.entity.SpuInfoDescEntity;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * @author CuiJunJie
 * @create 2021/6/30-15:10
 */
@Data
public class SkuItemVo {
    SkuInfoEntity info;

    boolean hasStock = true;

    List<SkuImagesEntity> images;

    SpuInfoDescEntity desc;

    List<SkuItemSaleAttrVo> saleAttr;

    List<SpuItemAttrGroupVo> groupAttrs;

    SeckillSkuVo seckillSkuVo = new SeckillSkuVo();



    @Data
    public static class SkuItemSaleAttrVo {
        private Long attrId;
        private String attrName;
        private List<AttrValueWithSkuIdVo> attrValues;
    }

    @Data
    public static class AttrValueWithSkuIdVo {
        private String attrValue;
        private Set<Long> skuIds;
    }

    @Data
    public static class SpuItemAttrGroupVo {
        private String groupName;
        private List<SpuBaseAttrVo> attrs;
    }

    @Data
    public static class SpuBaseAttrVo {
        private String attrName;
        private String attrValue;
    }
}
